<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- 
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License. 
-->
<html>
<head>
    <link type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
    <style type="text/css">
        .dp-highlighter {
            width:95% !important;
        }
    </style>
    <style type="text/css">
        .footer {
            background-image:      url('https://cwiki.apache.org/confluence/images/border/border_bottom.gif');
            background-repeat:     repeat-x;
            background-position:   left top;
            padding-top:           4px;
            color:                 #666;
        }
    </style>
    <link href='https://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' />
    <link href='https://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' />
    <script src='https://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script>
    <script src='https://struts.apache.org/highlighter/js/shBrushPlain.js' type='text/javascript'></script>
    <script src='https://struts.apache.org/highlighter/js/shBrushXml.js' type='text/javascript'></script>
    <script src='https://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
    <script src='https://struts.apache.org/highlighter/js/shBrushJScript.js' type='text/javascript'></script>
    <script src='https://struts.apache.org/highlighter/js/shBrushGroovy.js' type='text/javascript'></script>
    <script src='https://struts.apache.org/highlighter/js/shBrushBash.js' type='text/javascript'></script>
    <script type="text/javascript">
        SyntaxHighlighter.defaults['toolbar'] = false;
        SyntaxHighlighter.all();
    </script>
    <script type="text/javascript" language="javascript">
        var hide = null;
        var show = null;
        var children = null;

        function init() {
            /* Search form initialization */
            var form = document.forms['search'];
            if (form != null) {
                form.elements['domains'].value = location.hostname;
                form.elements['sitesearch'].value = location.hostname;
            }

            /* Children initialization */
            hide = document.getElementById('hide');
            show = document.getElementById('show');
            children = document.all != null ?
                    document.all['children'] :
                    document.getElementById('children');
            if (children != null) {
                children.style.display = 'none';
                show.style.display = 'inline';
                hide.style.display = 'none';
            }
        }

        function showChildren() {
            children.style.display = 'block';
            show.style.display = 'none';
            hide.style.display = 'inline';
        }

        function hideChildren() {
            children.style.display = 'none';
            show.style.display = 'inline';
            hide.style.display = 'none';
        }
    </script>
    <title>One time steps</title>
</head>
<body onload="init()">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
    <tr class="topBar">
        <td align="left" valign="middle" class="topBarDiv" align="left" nowrap>
            &nbsp;<a href="home.html">Home</a>&nbsp;&gt;&nbsp;<a href="guides.html">Guides</a>&nbsp;&gt;&nbsp;<a href="contributors-guide.html">Contributors Guide</a>&nbsp;&gt;&nbsp;<a href="creating-and-signing-a-distribution.html">Creating and Signing a Distribution</a>&nbsp;&gt;&nbsp;<a href="one-time-steps.html">One time steps</a>
        </td>
        <td align="right" valign="middle" nowrap>
            <form name="search" action="https://www.google.com/search" method="get">
                <input type="hidden" name="ie" value="UTF-8" />
                <input type="hidden" name="oe" value="UTF-8" />
                <input type="hidden" name="domains" value="" />
                <input type="hidden" name="sitesearch" value="" />
                <input type="text" name="q" maxlength="255" value="" />
                <input type="submit" name="btnG" value="Google Search" />
            </form>
        </td>
    </tr>
</table>

<div id="PageContent">
    <div class="pageheader" style="padding: 6px 0px 0px 0px;">
        <!-- We'll enable this once we figure out how to access (and save) the logo resource -->
        <!--img src="/wiki/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"-->
        <div style="margin: 0px 10px 0px 10px" class="smalltext">Apache Struts 2 Documentation</div>
        <div style="margin: 0px 10px 8px 10px"  class="pagetitle">One time steps</div>

        <div class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;">
            <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=27832952">
                <img src="https://cwiki.apache.org/confluence/images/icons/notep_16.gif"
                     height="16" width="16" border="0" align="absmiddle" title="Edit Page"></a>
            <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=27832952">Edit Page</a>
            &nbsp;
            <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">
                <img src="https://cwiki.apache.org/confluence/images/icons/browse_space.gif"
                     height="16" width="16" border="0" align="absmiddle" title="Browse Space"></a>
            <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">Browse Space</a>
            &nbsp;
            <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=27832952">
                <img src="https://cwiki.apache.org/confluence/images/icons/add_page_16.gif"
                     height="16" width="16" border="0" align="absmiddle" title="Add Page"></a>
            <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=27832952">Add Page</a>
            &nbsp;
            <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=27832952">
                <img src="https://cwiki.apache.org/confluence/images/icons/add_blogentry_16.gif"
                     height="16" width="16" border="0" align="absmiddle" title="Add News"></a>
            <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=27832952">Add News</a>
        </div>
    </div>

    <div class="pagecontent">
        <div class="wiki-content">
            <div id="ConfluenceContent"><h1 id="Onetimesteps-Content">Content</h1>
<style type="text/css">/*<![CDATA[*/
div.rbtoc1440489346579 {padding: 0px;}
div.rbtoc1440489346579 ul {list-style: none;margin-left: 0px;}
div.rbtoc1440489346579 li {margin-left: 0px;padding-left: 0px;}

/*]]>*/</style><div class="toc-macro rbtoc1440489346579">
<ul class="toc-indentation"><li><span class="TOCOutline">1</span> <a shape="rect" href="#Onetimesteps-Content">Content</a>
<ul class="toc-indentation"><li><span class="TOCOutline">1.1</span> <a shape="rect" href="#Onetimesteps-Keysandconfiguration">Keys and configuration</a>
<ul class="toc-indentation"><li><span class="TOCOutline">1.1.1</span> <a shape="rect" href="#Onetimesteps-CreateandinstallaSSHkey">Create and install a SSH key</a></li><li><span class="TOCOutline">1.1.2</span> <a shape="rect" href="#Onetimesteps-CreateaPGPkey">Create a PGP key</a></li><li><span class="TOCOutline">1.1.3</span> <a shape="rect" href="#Onetimesteps-UpdateMavensettingsforourservers">Update Maven settings for our servers</a></li><li><span class="TOCOutline">1.1.4</span> <a shape="rect" href="#Onetimesteps-IncreaseMemorySettingsforMaven">Increase Memory Settings for Maven</a></li></ul>
</li><li><span class="TOCOutline">1.2</span> <a shape="rect" href="#Onetimesteps-Resources">Resources</a></li><li><span class="TOCOutline">1.3</span> <a shape="rect" href="#Onetimesteps-Retagging">Retagging</a></li><li><span class="TOCOutline">1.4</span> <a shape="rect" href="#Onetimesteps-Amendingalogentry">Amending a log entry</a></li></ul>
</li></ul>
</div>

<h2 id="Onetimesteps-Keysandconfiguration">Keys and configuration</h2>

<h3 id="Onetimesteps-CreateandinstallaSSHkey">Create and install a SSH key </h3>

<ul><li>See <a shape="rect" class="external-link" href="http://sial.org/howto/openssh/publickey-auth/" rel="nofollow">OpenSSH Public Key Authentication</a></li></ul>


<div class="confluence-information-macro confluence-information-macro-note"><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
<p>If you get hung up during release:perform because Maven can't verify the authenticity of a host, then there could be one of two <br clear="none">
different problems. The first problem, which is an easy fix, is to go to the command line and use SSH to log in to that host. You <br clear="none">
should receive a prompt to add the host to your known_hosts file. If you add the host to your known_hosts file from the command line <br clear="none">
SSH, then you should be able to try release:perform again and have more success. There is a chance though that this won't fix maven.</p>

<p>Maven doesn't appear to understand hashed known_hosts files. There is some information here - <a shape="rect" class="external-link" href="http://itso.iu.edu/Hashing_the_OpenSSH_known__hosts_File" rel="nofollow">known_hosts file Hashing</a>. <br clear="none">
If your known_hosts file is hashed, you can solve this one of a few different ways. If you perform a deploy:deploy instead of <br clear="none">
release:perform, then maven will leave a prompt open for you to type 'yes' and have maven add the host (in a way that Jsch, the library <br clear="none">
which provides Maven Wagon with the SSH/SCP functionality, understands) to your known_hosts file. Another option is to remove your <br clear="none">
known_hosts file, update your SSH configuration so that it does not hash the hostname in known_hosts and try to log in from the command <br clear="none">
line. </p></div></div>

<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -q -f ~/.ssh/id_rsa -t rsa
#Enter a passphrase
chmod go-rwx ~/.ssh/*

#copy the public key to people.apache.org
scp ~/.ssh/id_rsa.pub people.apache.org:/home/$USERNAME

# next, setup the public key on server
ssh people.apache.org
mkdir ~/.ssh
chmod 700 ~/.ssh
cat ~/id_rsa.pub &gt;&gt; ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
rm ~/id_rsa.pub
</pre>
</div></div>

<h3 id="Onetimesteps-CreateaPGPkey">Create a PGP key</h3>
<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
svn co https://svn.apache.org/repos/asf/struts/maven/trunk/build struts-maven-build
cd struts-maven-build
(gpg --fingerprint --list-sigs &lt;your name&gt; &amp;&amp; gpg --armor --export &lt;your name&gt;) &gt;&gt; KEYS
scp KEYS people.apache.org:/www/www.apache.org/dist/struts
svn commit KEYS -m "Add public key"
</pre>
</div></div>

<h3 id="Onetimesteps-UpdateMavensettingsforourservers">Update Maven settings for our servers</h3>
<p>Create a settings.xml under ~/.m2 and follow below instructions:</p>
<ul><li>create profile - <a shape="rect" class="external-link" href="http://maven.apache.org/developers/release/apache-release.html#Prerequisites">Releasing a Maven-based</a></li><li>enable Apache servers <a shape="rect" class="external-link" href="http://maven.apache.org/developers/committer-settings.html">Committer Settings</a></li></ul>


<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
&lt;settings xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"&gt;
  &lt;servers&gt;
    &lt;!-- To publish a snapshot of some part of Maven --&gt;
    &lt;server&gt;
      &lt;id&gt;apache.snapshots.https&lt;/id&gt;
      &lt;username&gt; &lt;!-- YOUR APACHE LDAP USERNAME --&gt; &lt;/username&gt;
      &lt;password&gt; &lt;!-- YOUR APACHE LDAP PASSWORD --&gt; &lt;/password&gt;
    &lt;/server&gt;
    &lt;!-- To publish a website of some part of Maven --&gt;
    &lt;server&gt;
      &lt;id&gt;apache.website&lt;/id&gt;
      &lt;username&gt; &lt;!-- YOUR APACHE LDAP USERNAME --&gt; &lt;/username&gt;
      &lt;filePermissions&gt;664&lt;/filePermissions&gt;
      &lt;directoryPermissions&gt;775&lt;/directoryPermissions&gt;
    &lt;/server&gt;
    &lt;!-- To stage a release of some part of Maven --&gt;
    &lt;server&gt;
      &lt;id&gt;apache.releases.https&lt;/id&gt;
      &lt;username&gt; &lt;!-- YOUR APACHE LDAP USERNAME --&gt; &lt;/username&gt;
      &lt;password&gt; &lt;!-- YOUR APACHE LDAP PASSWORD --&gt; &lt;/password&gt;
    &lt;/server&gt;
    &lt;!-- To stage a website of some part of Maven --&gt;
    &lt;server&gt;
      &lt;id&gt;stagingSite&lt;/id&gt; &lt;!-- must match hard-coded repository identifier in site:stage-deploy --&gt;
      &lt;username&gt; &lt;!-- YOUR APACHE LDAP USERNAME --&gt; &lt;/username&gt;
      &lt;filePermissions&gt;664&lt;/filePermissions&gt;
      &lt;directoryPermissions&gt;775&lt;/directoryPermissions&gt;
    &lt;/server&gt;
  &lt;/servers&gt;
  &lt;profiles&gt;
    &lt;profile&gt;
      &lt;id&gt;apache-release&lt;/id&gt;
      &lt;properties&gt;
        &lt;gpg.passphrase&gt; &lt;!-- YOUR KEY PASSPHRASE --&gt; &lt;/gpg.passphrase&gt;
      &lt;/properties&gt;
    &lt;/profile&gt;
  &lt;/profiles&gt;
&lt;/settings&gt;
</pre>
</div></div>

<h3 id="Onetimesteps-IncreaseMemorySettingsforMaven">Increase Memory Settings for Maven</h3>

<p>To complete a full build and all the tests, it may be neccesary to increase the amount of memory available to Maven. The simplest thing is to set an environment variable.</p>
<ul><li><code>MAVEN_OPTS=-Xmx512m</code> or even <code>MAVEN_OPTS=-Xmx1024m</code></li></ul>


<h2 id="Onetimesteps-Resources">Resources</h2>

<ul><li>Apache Struts <a shape="rect" class="external-link" href="http://struts.apache.org/releases.html#Releases">Release Guidelines</a></li><li><a shape="rect" class="external-link" href="http://wiki.apache.org/struts/StrutsMaintenanceMaven">Struts Maintenance Guide for Maven </a></li><li><a shape="rect" class="external-link" href="http://apache.org/dev/release-signing.html">Signing Releases</a></li><li><a shape="rect" class="external-link" href="http://wiki.wsmoak.net/cgi-bin/wiki.pl?ReleaseSigning" rel="nofollow">Wendy's notes on Release Signing</a></li><li>Apache <a shape="rect" class="external-link" href="http://apache.org/dev/mirrors.html">Mirroring Guidelines</a></li></ul>


<h2 id="Onetimesteps-Retagging">Retagging</h2>

<p>If a tagged build needs to be retagged, be sure to delete the old tag first.</p>
<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
svn delete https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_#_#_# -m "WW-### Removing first try at 2.#.#."
</pre>
</div></div>

<h2 id="Onetimesteps-Amendingalogentry">Amending a log entry</h2>

<p>If the commit was fine, but the log was wrong, updating the log entry is easy. For example,</p>
<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
&gt; svn propset --revprop -r 504523 svn:log "WW-1715 Branch for 2.0.x at Struts 2.0.6-SNAPSHOT r504196"
&gt; property 'svn:log' set on repository revision 504523
</pre>
</div></div>
<p>See <code>svn help propset</code> for more.</p></div>
        </div>

        
    </div>
</div>
<div class="footer">
    Generated by CXF SiteExporter
</div>
</body>
</html>
